/PROG  PNS0074
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53461332";
PROG_SIZE	= 3432;
CREATE		= DATE 20-10-22  TIME 12:16:20;
MODIFIED	= DATE 24-11-07  TIME 21:41:38;
FILE_NAME	= PNS0056;
VERSION		= 0;
LINE_COUNT	= 125;
MEMORY_SIZE	= 3876;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0025 ;
   7:  !  AUTHOR:HuangLin ;
   8:  !  PART:53342704 ;
   9:  !YZL15-8-13********************** ;
  10:   ;
  11:  !INITIALIZE ;
  12:  MOVE TO HOME    ;
  13:  R[14:CG SENSETIVE]=90    ;
  14:  R[18:PICK TIME BEFORE]=1    ;
  15:  R[19:DROP TIME BEFORE]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[1] ;
  24:  R[5:SPEED           ]=10    ;
  25:  OVERRIDE=R[5:SPEED           ] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:   ;
  30:  R[1:CYCLE TOTAL]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5:SPEED           ] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  40:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  41:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  42:  R[8:R MOVE TIME]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  50:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:   ;
  53:  LBL[25] ;
  54:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  55:  R[5:SPEED           ]=100    ;
  56:  TIMER[3]=START ;
  57:  OVERRIDE=R[5:SPEED           ] ;
  58:J P[3:PICK APPROACH] 100% CNT80 ACC100    ;
  59:   ;
  60:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  61:  PAYLOAD[2] ;
  62:  CALL CHK_PICK    ;
  63:  MONITOR Z_CHECH ;
  64:J P[5:PICK DEPART] 100% CNT100 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  65:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  66:  LBL[27] ;
  67:  CALL CHECKPICK    ;
  68:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  69:   ;
  70:   ;
  71:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  72:   ;
  73:   ;
  74:  LBL[30:GOTO DROP POUNCE] ;
  75:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  76:   ;
  77:  TIMER[3]=STOP ;
  78:  LBL[40:AT DROP POUNCE] ;
  79:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  80:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  81:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  82:  JMP LBL[40] ;
  83:   ;
  84:  LBL[50:MOVE DROP SNEAK] ;
  85:  TIMER[3]=START ;
  86:  OVERRIDE=R[5:SPEED           ] ;
  87:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  88:  LBL[51:DROP OR C-P-S] ;
  89:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  90:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  91:  JMP LBL[51] ;
  92:  JMP LBL[50] ;
  93:   ;
  94:  LBL[60:MOVE CLS-PRS-ACC] ;
  95:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  96:  PAUSE ;
  97:  JMP LBL[30] ;
  98:   ;
  99:  LBL[80:DROP ENABLED] ;
 100:  TIMER[3]=START ;
 101:  !PROCEED TO DROP ;
 102:  OVERRIDE=R[5:SPEED           ] ;
 103:J P[10:DROP APPROACH] 100% CNT80 ACC100    ;
 104:  MONITOR END Z_CHECH ;
 105:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 106:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 107:  PAYLOAD[1] ;
 108:  CALL CHK_DROP    ;
 109:   ;
 110:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 111:  DO[7:PRESS STAMPING START]=PULSE,1.0sec ;
 112:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 113:  !GOTO PICK POUNCE ;
 114:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 115:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 116:  JMP LBL[10] ;
 117:   ;
 118:  LBL[90:END OF CYCLE] ;
 119:  TIMER[1]=STOP ;
 120:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 121:  MONITOR END MON_PICK ;
 122:J P[1:MIDDLE] 50% CNT100    ;
 123:  MOVE TO HOME    ;
 124:   ;
 125:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1092.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.403  mm,	Y =  1575.868  mm,	Z = -1120.360  mm,
	W =   179.324 deg,	P =     1.370 deg,	R =   150.801 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2628.061  mm,	Y =  3286.654  mm,	Z =  -989.174  mm,
	W =  -179.447 deg,	P =    -2.800 deg,	R =    90.679 deg,
	E1=   195.062 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2628.062  mm,	Y =  3286.654  mm,	Z = -1194.517  mm,
	W =  -179.447 deg,	P =    -2.800 deg,	R =    90.679 deg,
	E1=   195.062 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2628.061  mm,	Y =  3286.654  mm,	Z =  -934.374  mm,
	W =  -179.447 deg,	P =    -2.800 deg,	R =    90.679 deg,
	E1=   195.062 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2198.649  mm,	Y =  1649.964  mm,	Z = -1033.993  mm,
	W =   179.236 deg,	P =      .812 deg,	R =   142.111 deg,
	E1=   143.028 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.562  mm,	Y = -1182.880  mm,	Z = -1000.000  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2255.499  mm,	Y = -2244.622  mm,	Z =  -997.481  mm,
	W =  -178.420 deg,	P =     -.047 deg,	R =  -129.425 deg,
	E1=    54.577 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2676.454  mm,	Y = -3218.529  mm,	Z = -1017.771  mm,
	W =  -179.129 deg,	P =     -.412 deg,	R =   -91.361 deg,
	E1=    17.146 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2676.453  mm,	Y = -3218.529  mm,	Z = -1190.970  mm,
	W =  -179.129 deg,	P =     -.412 deg,	R =   -91.361 deg,
	E1=    17.146 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2676.454  mm,	Y = -3218.529  mm,	Z = -1086.571  mm,
	W =  -179.129 deg,	P =     -.412 deg,	R =   -91.361 deg,
	E1=    17.146 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2162.451  mm,	Y = -1269.488  mm,	Z = -1161.394  mm,
	W =  -176.631 deg,	P =      .000 deg,	R =  -149.250 deg,
	E1=    73.819 deg
};
/END
